<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/messages.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css">

<%@ include file="/commons/validation.jsp" %>
<%@ include file="/commons/dateTime.jsp" %>
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">

<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/ajaxException.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/pages/com/ce/pms/customer/tenement.js"></script>

<script type="text/javascript">
	var houseId = null;
	var houseNum = null;
	var index = null;
	var formSerialize = null;
	var saveOrClose = null;

	function openHouseAdd(){
		var url = '${ctx}/customer_ownerAction.do?method=initOwnerHouseAdd';
		top.windowOpen(url, 'ownerBaseAdd', '新增住房信息',380,470,false,"houseChooseFrame");
	}

	function openHouseEdit(){
		if(houseId == null) {
			Alert("请选择一个房间");
			return;
		}
		var url = '${ctx}/customer_ownerAction.do?method=initOwnerHouseEdit&edit_houseId=' + houseId;
		top.windowOpen(url,"houseEditFrm","修改住房信息",380,470);
	}
	/*****删除房屋*****/
	function openHouseDelete(){
		if(index == null){
			Alert("请选择一个房间");
			return;
		}
		if(confirm("您确定删除该条记录吗？")){
			var url = "${ctx}/customer_ownerAction.do?method=deleteCustomerHouseCache&houseId="+ houseId + "&houseNumber="+ houseNum +"&index=" + index;
			var myAjax = new Ajax.Request(url, {method: 'post', parameters: null, onComplete: processHouseDelete});
		}
	}
	function processHouseDelete(result){
		var resultText = result.responseText;
		if('true' == resultText){
			parent.setFamilyUnEdit();
			reLoadIframe();
		}
		else if('isOneHouse' == resultText){
			Alert("最后一个房间不能删除");
		}
	}
/************common JS methos***/
	function beforSubmitForm(){
		var formStr = document.forms[0].serialize();
		return formSerialize == formStr;
	}
	function submitForm(_saveOrClose){
	    saveOrClose = _saveOrClose;
		var _form = document.forms[0];
		var flag = _form.fireEvent("onsubmit");
		if(!flag) return;

		var formAction = _form.action;
		var parameters = $(_form).serialize();
		formSerialize = _form.serialize(); //保存修改后的数据
		new Ajax.Request(formAction, {method: 'post', parameters: parameters, onComplete: closeFrm});
	}
	function closeFrm(response){
	   		ajaxSubmitException(response.responseText);

            if('true' == response.responseText.strip()){
                    flag_button_click=true;
					parent.flushList();
					//如果是传参标识为保存,说明不需要关闭的(如修改数据后,点击了家庭成员页签),则直接返回
					if(saveOrClose == "save") return;

					parent._closeWindow();
          	} else if('false' == response.responseText.strip()){
                    Alert("数据不要重复保存！");
          	}else if('houseIsNull' == response.responseText.strip()){
          		Alert("住房信息不能为空");
          	}
    }

<c:if test="${type eq '001'}">
	var individual = null;
	var interestObj = null;
</c:if>

<c:if test="${type eq '002'}">
	var enterprise = null;
</c:if>
/*****common var ***/
	function setHouseId(house_id){
		houseId = house_id;
	}
	function setHouseNum(houseNum_){
		houseNum = houseNum_;
	}
	function setIndex(index_){
		index = index_;
	}

	function reLoadIframe(){
		document.frames["ownerHouseListIframe"].location = "${ctx}/customer_ownerAction.do?method=findOwnerHouseCachePage&ec_p=1&ec_crd=5";
	}

	function resize(){
		parent.window.document.all("ownerList").style.height=document.body.scrollHeight;
	}

	function getFlagButtonClick(){
		return flag_button_click;
	}

	function setFlagButtonClick(){
	 flag_button_click=true;
	}
/*************/
      function init(){
      	var src = "${ctx}/customer_ownerAction.do?method=initOwnerHouseListOnEdit&participantId="
    	<c:if test="${type eq '001'}">
			  src += "${individualOwnerBase.participantId}";

			  individual = new Individual(null,'individualForm');
			  individual.init();

			  interestObj = new Interest('selectedInterest','unSelectInterest');
      	</c:if>
      	<c:if test="${type eq '002'}">
      		 src += "${organization.participantId}"

	 		 enterprise = new Enterprise('organizationOwner');
			 enterprise.init();
      	</c:if>
      	document.frames["ownerHouseListIframe"].location = src;
      	var formId = document.forms[0].id;
      	formSerialize = $(formId).serialize();
      }
</script>
</head>
<body onload="resize();init();">
<div style="overflow:auto; height:400px;">
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" id="tab_subMenu1">
                      <tr>
                        <td>
                        	<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
                            	<tr>
                              		<td>
                              			<table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color"  style="display:show">
					                        <tr>
					                          <td colspan="4" class="aux_titletable">住房信息</td>
					                        </tr>
                      					</table>
							  			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tab_line">
						                    <tr>
						                      	<td valign="top">
						                      		<table width="100%" border="0" cellspacing="0" cellpadding="0" >
                        								<tr>
              												<td class="bg_toolBar">
              													<table width="100%" border="0" cellspacing="0" cellpadding="0">
													                  <tr>
													                    	<td width="35%" align="right">
																			<table border="0" cellpadding="0" cellspacing="0" id="ico1">
													                      		<tr>
													                        		<td class="toolbarico">
													                        			<a href="#"  onclick="openHouseAdd();" onfocus="this.blur();">
													                        			<img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="新增"/>&nbsp;</a>
													                        		</td>
													                            	<td  class="toolbarico" >
													                            		<a href="#" this.blur()" onClick="openHouseEdit();" onFocus="this.blur();">
													                            			<img src="${ctx}/images/ico_amend.gif" alt="修改" width="16" height="16" border="0" align="absbottom" /></a>
													                            	</td>
													                            	<td class="toolbarico">
													                            		<a href="#" onClick="openHouseDelete();" onFocus="this.blur()">
													                            		<img src="${ctx}/images/ico_delete.gif" alt="删除" width="16" height="16" border="0" align="absbottom"></a>
													                            	</td>
													          						<td  class="toolbarico">&nbsp;</td>
													                          	</tr>
													                      	</table>
																		  </td>
													                    </tr>
                												</table>
															</td>
             											</tr>
             										</table>
								              <tr>
								                <td colspan="5" >
								                	<iframe id="ownerHouseListIframe" frameborder="0"  src="" width="100%"></iframe>
												</td>
								               </tr>
                      </table></td>
                    </tr>
                </table>
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tab_line">
            <tr>
              	<td valign="top">
					<c:if test="${type eq '001'}">
							<form id="individualForm" name="individualForm" action="${ctx}/customer_ownerAction.do?method=editOwnerIndividual" method="post" class="required-validate">
                                <!-- 业主ID -->
                                <input type="hidden" id="participantId" name="participantId" value="${individualOwnerBase.participantId}">
                                <input type="hidden" id="oldParticipantId" name="oldParticipantId" value="${individualOwnerBase.participantId}">
                                <input type="hidden" id="index" name="index" value="${individualOwnerBase.index}">
                                <input type="hidden" id="optionType" name="optionType" value="isEdit">
								<!-- 兴趣爱好 -->
                                <input type="hidden" name="interest" value="${individualOwnerBase.interest}">

                                  <table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color" id="table01" style="display:show">
                                    <tr>
                                      <td colspan="4" class="aux_titletable">基本资料&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">此功能只做修改业主资料，如果是过户，请走产权变更流程，严禁在此操作！</font></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">姓名：</td>
                                      <td class="aux_intable_require">
                                      				<input id="participantName"
                                      					   name="participantName"
                                      					   type="text"
                                      					   class="inputtext required validate-char"
                                      					   maxlength="80"
                                      					   size="16"
                                      					   value="${individualOwnerBase.participantName}">                                      </td>
                                      <td class="aux_intable_td1">证件类型：</td>
                                      <td class="aux_intable_require">
	                                      <pms:unitedSelect name="certificateType" id="certificateType"
	                                      					dataList="${certificateTypeList}"
	                                      					optionLabel="idTypeName"
	                                      					optionValue="idTypeId"
	                                      					selectText="请选择..."
	                                      					className="select-one-required"
	                                      					value="${individualOwnerBase.certificateType}"
	                                      					onChange="individual.setInfoByCertificate();">
	                                      </pms:unitedSelect>
                                      </td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">称呼：</td>
                                      <td class="aux_intable_td2">
                                      			<input name="appellative"
                                      			       type="text"
                                      			       class="inputtext validate-char max-length-20"
                                      			       size="16"
                                      			       value="${individualOwnerBase.appellative}"
                                      			       maxlength="20">
                                      </td>
                                      <td class="aux_intable_td1">证件号码：</td>
                                      <td class="aux_intable_require">
                                      		<input name="certificateNo"
                                      			   type="text"
                                      			   class="inputtext required validate-char max-length-36"
                                      			   size="16"
                                      			   onblur="individual.setInfoByCertificate();"
                                      			   value="${individualOwnerBase.certificateNo}" maxlength="36">                                      </td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">性别：</td>
                                      <td class="aux_intable_require">
                                      <mypms:Radio id="ownerId" name="sex" code="CS_INDIVIDUAL_SEX" className="validate-one-required" selectValue="${individualOwnerBase.sex}"></mypms:Radio>
                                      <td class="aux_intable_td1">联系电话：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="telephone" type="text" class="inputtext validate-char max-length-80" size="16" value="${individualOwnerBase.telephone}" maxlength="80"></td>
                                            <td width="4">&nbsp;</td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td colspan="4" class="aux_titletable">紧急联系信息</td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">紧急联系人：</td>
                                      <td class="aux_intable_td2"><input name="emergencyMan" type="text" class="inputtext validate-char" size="16" value="${individualOwnerBase.emergencyMan}" maxlength="30">                                      </td>
                                      <td class="aux_intable_td1">紧急联系电话：</td>
                                      <td class="aux_intable_td2"><input name="emergencyPhone" type="text" class="inputtext validate-char" size="16" value="${individualOwnerBase.emergencyPhone}" maxlength="40">                                      </td>
                                    </tr>
                                    <tr>
                                      <td colspan="4" class="aux_titletable">其他资料</td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">出生日期：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td>
                                            	<input
                                            		id="birthDate"
                                            		name="birthDate"
                                            		type="text"
                                            		class="inputtext validate-date-yyyy-mm-dd validate-ajax"
                                            		replaceId="dataValue"
                                            		validateUrl="${ctx}/common_sysrefcodeAction.do?method=compareCurrentDate&dateFormat=yyyy-MM-dd&compareType=smallEqualsCurrentDate"
                                            		afterInsert="imgBirthDate"
                                            		value="${individualOwnerBase.birthDate}"
                                            		maxlength="16"
                                            		size="16">
                                            </td>
                                            <td width="4">&nbsp;</td>
                                            <td><img id="imgBirthDate" src="${ctx}/images/ico_clock.gif" width="20" height="20"></td>
                                          </tr>
                                      </table></td>
                                      <td class="aux_intable_td1">电子邮件：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="email" type="text" class="inputtext validate-email" value="${individualOwnerBase.email}" size="16" maxlength="50"></td>
                                            <td width="4">&nbsp;</td>
                                            <td><img src="${ctx}/images/ico-aux_household_email.gif" width="16" height="16"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">籍贯：</td>
                                      <td class="aux_intable_td2"><input name="homeplace" type="text" class="inputtext validate-char" value="${individualOwnerBase.homeplace}" size="16" maxlength="200"></td>
                                      <td class="aux_intable_td1">车辆情况：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="registerCar" type="text" class="inputtext validate-char" maxlength="200" value="${individualOwnerBase.registerCar}" size="16"></td>
                                            <td width="4">&nbsp;</td>
                                            <td>&nbsp;</td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">户口所在地：</td>
                                      <td class="aux_intable_td2"><input name="registerPlace" type="text" maxlength="200" class="inputtext validate-char" value="${individualOwnerBase.registerPlace}" size="16"></td>
                                      <td rowspan="2" valign="top" class="aux_intable_td1">兴趣爱好：</td>
                                      <td rowspan="2" class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td>
                                            	<pms:unitedSelect   id="unSelectInterest"
                                            						name="unSelectInterest"
                                            						dataList="${interestList}"
                                            						optionLabel="name"
                                            						optionValue="interestId"
                                            						multiple="multiple"
                                            						size="3"
                                            						ondblclick="interestObj.moveToRight()"
                                            						style="width:100px;height:60px;color:#000000;border: 1px solid #9299A3;padding-top: 3px;"
                                            						>
                                            	</pms:unitedSelect>
                                          </td>
                                            <td><table border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                  <td width="4" style="width:4px;"></td>
                                                  <td width="4" class="between_space_both"></td>
                                                  <td>
			                                           <pms:unitedSelect id="selectedInterest" name="selectedInterest"
			                                           					dataList="${selectedInterest}"
			                                           					optionLabel="name"
			                                           					optionValue="interestId"
			                                           					multiple="multiple"
			                                           					size="3"
			                                           					ondblclick="interestObj.moveToLeft();"
			                                           					style="width:100px;height:60px;color:#000000;border: 1px solid #9299A3;padding-top: 3px;"
			                                           					>
			                                           </pms:unitedSelect>
                                                  </td>
                                                </tr>
                                            </table></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">职业：</td>
                                      <td valign="top" class="aux_intable_td2"><input name="profession" type="text" class="inputtext validate-char" maxlength="30" value="${individualOwnerBase.profession}" size="16"></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">单位名称：</td>
                                      <td class="aux_intable_td2"><input name="corporation" type="text" maxlength="100" class="inputtext validate-char" value="${individualOwnerBase.corporation}" size="16"></td>
                                      <td rowspan="2" valign="top" class="aux_intable_td1">备注：</td>
                                      <td rowspan="2" valign="top" class="aux_intable_td2"><textarea id="remark" name="remark" cols="29" rows="2" class="textareatext max-length-1000">${individualOwnerBase.remark}</textarea></td>
                                    </tr>
                                    <tr>
                                      <td valign="top" class="aux_intable_td1">联系地址：</td>
                                      <td valign="top" class="aux_intable_td2"><input name="linkAddress" type="text" class="inputtext validate-char" maxlength="255" value="${individualOwnerBase.linkAddress}" size="16"></td>
                                    </tr>
                                  </table>
							</form>
					</c:if>
					<c:if test="${type eq '002'}">
						<form id="organizationOwner" action="${ctx}/customer_ownerAction.do?method=editOwnerOrganization" method="post" class="required-validate">
                                <input type="hidden" name="certificateTypeName_organization" name="certificateTypeName" value="${certificateTypeList[0].idTypeName}">
                                <input type="hidden" name="oldParticipantId"  value="${organization.participantId}">
                                <input type="hidden" name="participantId"  value="${organization.participantId}">

                                <input type="hidden" name="oldCorporationId"  value="${organization.corporationId}">
                                <input type="hidden" name="corporationId"  value="${organization.corporationId}">

                                <input type="hidden" name="oldConsignerId"  value="${organization.consignerId}">
                                <input type="hidden" name="consignerId"  value="${organization.consignerId}">

                                <input type="hidden" name="index" value="${organization.index}">
                                <input type="hidden" id="optionType" name="optionType" value="isEdit">
                                <table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color" id="table02">
                                    <tr>
                                      <td colspan="4" class="aux_titletable">企业信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">此功能只做修改业主资料，如果是过户，请走产权变更流程，严禁在此操作！</font></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">单位名称：</td>
                                      <td class="aux_intable_require">
                                      		<input name="participantName"
                                      				value="${organization.participantName}"
                                      				onblur="enterprise.processEnterpriseName(this.value);"
                                      				type="text"
                                      				class="inputtext required validate-char"
                                      				size="16"
                                      				maxlength="80">                                      </td>
                                      <td class="aux_intable_td1">联系人：</td>
                                      <td class="aux_intable_td2"><input name="organizationLinkMan" value="${organization.organizationLinkMan}" type="text" class="inputtext validate-char" size="16" maxlength="80"></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">单位地址：</td>
                                      <td class="aux_intable_td2"><input name="address" value="${organization.address}" maxlength="255" type="text" class="inputtext validate-char" size="16"></td>
                                      <td class="aux_intable_td1">联系电话：</td>
                                      <td class="aux_intable_td2"><input id="orgTelephone" name="telephone" type="text" class="inputtext validate-char" size="16" value="${organization.telephone}" maxlength="80"></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">邮政编码：</td>
                                      <td class="aux_intable_td2"><input name="zip" value="${organization.zip}" type="text" class="inputtext validate-char" size="16" maxlength="30"></td>
                                      <td class="aux_intable_td1">&nbsp;</td>
                                      <td class="aux_intable_td2">&nbsp;</td>
                                    </tr>
                                    <tr>
                                      <td colspan="4" class="aux_titletable">法人基本资料</td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">姓名：</td>
                                      <td class="aux_intable_require"><input id="organizationPersonName" name="organizationPersonName" value="${organization.organizationPersonName}" type="text" class="inputtext required validate-char" size="16" maxlength="80">                                      </td>
                                      <td class="aux_intable_td1">出生日期：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td>
                                            	<input
                                            		id="orgcorporationBirthDate"
                                            		name="corporationBirthDate"
                                            		type="text"
                                            		class="inputtext  validate-date-yyyy-mm-dd validate-ajax"
                                            		replaceId="dataValue"
                                            		validateUrl="${ctx}/common_sysrefcodeAction.do?method=compareCurrentDate&dateFormat=yyyy-MM-dd&compareType=smallEqualsCurrentDate"
                                            		value="${organization.corporationBirthDate}"
                                            		afterInsert="imgBirthDateOrgnization"
                                            		size="16"
                                            		maxlength="16">
                                            	</td>
                                            <td width="4">&nbsp;</td>
                                            <td><img id="imgBirthDateOrgnization" src="${ctx}/images/ico_clock.gif" width="20" height="20"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">称呼：</td>
                                      <td class="aux_intable_td2"><input id="orgAppellative" name="appellative" value="${organization.appellative}" maxlength="20" type="text" class="inputtext validate-char" size="16"></td>
                                      <td class="aux_intable_td1">联系电话：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="organizationPersonPhone" value="${organization.organizationPersonPhone}" type="text" class="inputtext validate-char" size="16" maxlength="80"></td>
                                            <td width="4">&nbsp;</td>
                                            <td><img src="${ctx}/images/ico-aux_household_sj.gif" width="16" height="16"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">性别：</td>
                                      <td class="aux_intable_require">
                                      <mypms:Radio id="ownerId" name="sex" code="CS_INDIVIDUAL_SEX" className="validate-one-required" selectValue="${organization.sex}"></mypms:Radio>
                                        </td>
                                      <td class="aux_intable_td1">电子邮件：</td>
                                      <td class="aux_intable_td2"><input id="orgEmail" name="email" value="${organization.email}" type="text" class="inputtext validate-email" maxlength="50" size="16"></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">证件类型：</td>
                                      <td class="aux_intable_require">
                                     <pms:unitedSelect name="certificateType"
                                     					id="orgcertificateType"
                                      					dataList="${certificateTypeList}"
                                      					optionLabel="idTypeName"
                                      					optionValue="idTypeId"
                                      					className="select-one-required"
                                      					value="${organization.certificateType}"
                                      					selectText="请选择..."
                                      					onChange="enterprise.corporation();">
                                      </pms:unitedSelect>
                                      </td>
                                      <td class="aux_intable_td1">联系地址：</td>
                                      <td class="aux_intable_td2"><input id="orgLinkAddress" name="linkAddress" value="${organization.linkAddress}" type="text" class="inputtext validate-char" maxlength="255" size="16"></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">证件号码：</td>
                                      <td class="aux_intable_require"><input id="orgcertificateNo" name="certificateNo" maxlength="36" value="${organization.certificateNo}" onblur="enterprise.corporation();" type="text" class="inputtext required validate-char" size="16">                                      </td>
                                      <td rowspan="2" valign="top" class="aux_intable_td1">备注：</td>
                                      <td rowspan="2" valign="top" class="aux_intable_td2"><textarea name="remark" cols="29" rows="2" class="textareatext max-length-1000">${organization.remark}</textarea></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">户口所在地：</td>
                                      <td class="aux_intable_td2"><input id="orgRegisterPlace" name="registerPlace" value="${organization.registerPlace}" maxlength="200" type="text" class="inputtext validate-char" size="16"></td>
                                    </tr>
                                    <tr>
                                      <td colspan="4" class="aux_titletable">委托代理人</td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">姓名：</td>
                                      <td class="aux_intable_require"><input name="consignerName" maxlength="80" type="text" class="inputtext required validate-char" value="${organization.consignerName}" size="16"></td>

                                      <td class="aux_intable_td1">联系电话：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="consignerPhone" value="${organization.consignerPhone}" type="text" class="inputtext validate-char" size="16" maxlength="80"></td>
                                            <td width="4">&nbsp;</td>
                                            <td><img src="${ctx}/images/ico-aux_household_sj.gif" width="16" height="16"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">性别：</td>
                                      <td class="aux_intable_require">
                                      <mypms:Radio id="ownerId" name="consignerSex" code="CS_INDIVIDUAL_SEX" className="validate-one-required" selectValue="${organization.consignerSex}"></mypms:Radio>
                                        </td>
                                      <td class="aux_intable_td1">电子邮件：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="consignerEmail"  type="text" class="validate-email" value="${organization.consignerEmail}" size="16" maxlength="50"></td>
                                            <td width="4">&nbsp;</td>
                                            <td><img src="${ctx}/images/ico-aux_household_email.gif" width="16" height="16"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">证件类型：</td>
                                      <td class="aux_intable_require">
                                    <pms:unitedSelect name="consignerCertificateType"
                                      					dataList="${certificateTypeList}"
                                      					optionLabel="idTypeName"
                                      					optionValue="idTypeId"
                                      					value="${organization.consignerCertificateType}"
                                      					selectText="请选择..."
                                      					onChange="enterprise.consigner();"
                                      					className="select-one-required">
                                      </pms:unitedSelect>

                                      </td>
                                      <td class="aux_intable_td1">籍贯：</td>
                                      <td class="aux_intable_td2"><input name="consignerHomeplace" type="text" maxlength="200" class="inputtext validate-char" value="${organization.consignerHomeplace}" size="16"></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">证件号码：</td>
                                      <td class="aux_intable_require"><input name="consignerCertificateNo" maxlength="36" value="${organization.consignerCertificateNo}" onblur="enterprise.consigner();" type="text" class="inputtext required validate-char" size="16">                                      </td>
                                      <td class="aux_intable_td1">联系地址：</td>
                                      <td class="aux_intable_td2"><input name="consignerAddress" type="text" maxlength="255" class="inputtext validate-char" value="${organization.consignerAddress}" size="16"></td>
                                    </tr>
                                </table>
                              </form>
					</c:if>
  				</td>
          </tr>
      </table></td>
                      </tr>
                  </table></td>
                </tr>
              </table>
</div>
<script type="text/javascript">
	<c:if test="${type eq '001'}">
              Calendar.setup(
              {
	              inputField : "birthDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "imgBirthDate", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
	</c:if>
	<c:if test="${type eq '002'}">
              Calendar.setup(
              {
	              inputField : "corporationBirthDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "imgBirthDateOrgnization", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
    </c:if>
</script>
</body>
</html>